<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: wurenjie
  Date: 15/5/14
  Time: 11:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title><s:property value="title"/></title>
    <s:include value="head.jsp" />
</head>
<body>
<div class="body-container">
    <s:include value="header.jsp" />
    <div class="comment">
        <div class="thread-up-title">
            <h3><s:property value="title"/> </h3>
        </div>

        <s:iterator value="floors" id="it" status="st">
            <div class="sub-frame">
                <div class="saylist">
                    <a href="">
                        <img src="
                        <s:action name="getavatar" executeResult="true" ignoreContextParams="true">
                            <s:param name="uid" value="#it.author"/>
                        </s:action>
                        " width="60" height="60" alt="def" class="avatar"/>
                    </a>
                    <div class="sayTxt">
                        <p>
                            <strong id="reply-name">
                            <s:action name="getusername" executeResult="true" ignoreContextParams="true">
                                <s:param name="uid" value="#it.author"/>
                            </s:action>
                             </strong>
                        </p>
                        <div class="t-content"><s:property value="#it.content"/> </div>
                        <ul>
                            <li><a href="javascript:;" id="dianZan"><span class="glyphicon glyphicon-heart" aria-hidden="true" onclick="inczan(<s:property value="#it.id"/>,this)"></span></a></li>
                            <li><span id="zanNum"><s:property value="#it.zan"/></span></li>
                            <li><a href="javascript:;" class="reply">回复</a></li>
                            <li><div class="date"><s:property value="sdf.format(#it.postTime)"/> </div></li>
                            <div class="floor-id"><s:property value="#st.getCount()" /></div>
                        </ul>
                    </div>
                </div>
                <s:if test="#it.infloorId!=null">
                    <s:iterator value="inFloors.get(#it.id)" id="fl" status="flst">
                        <div class="sub-saylist">
                            <a href="#">
                                <img src="
                                <s:action name="getavatar" executeResult="true" ignoreContextParams="true">
                                     <s:param name="uid" value="#fl.author"/>
                                </s:action>
                                " width="40" height="40" alt="def" class="sub-avatar" />
                            </a>
                            <div class="sayTxt">
                                <p><strong id="reply-name">
                                    <s:action name="getusername" executeResult="true" ignoreContextParams="true">
                                        <s:param name="uid" value="#fl.author"/>
                                    </s:action>
                                </strong></p>
                                <div class="t-content">
                                    <s:property value="#fl.content"/>
                                </div>
                                <ul>
                                    <li><a href="javascript:;" id="dianZan"><span class="glyphicon glyphicon-heart" aria-hidden="true" onclick="inczan(<s:property value="#fl.id"/>,this)" ></span></a></li>
                                    <li><span id="zanNum"><s:property value="#fl.zan"/></span></li>
                                    <li><a href="javascript:;" class="reply-infloor">回复</a></li>
                                    <li><div class="date"><s:property value="sdf.format(#fl.postTime)"/></div></li>

                                </ul>
                            </div>
                        </div>
                    </s:iterator>
                </s:if>
                <div class="sub-container notshow">
                    <textarea class="sub-sayArea" id="sub-sayArea" rols="4" cols="70"></textarea>
                    <div class="sub-button">
                        <button class="btn btn-default btn-sm  sub-submit">提交</button>
                        <input type="hidden" class="fa_floor_id" value="<s:property value="#it.id" />"/>
                    </div>
                </div>
                <div class="clear"></div>
            </div>
        </s:iterator>

        <div class="replylist"></div>

        <div class="clear"></div>
        <!--留言板内容-->
        <div id="sayWrap"></div>
        <!--页数-->
        <div class="pageCount"></div>
    </div>

    <div class="comment">
        <form id="myForm" action="" method="post">
            <div class="comment-container">
                <div class="comment-image">
                    <s:if test="#session.login_user==null||(#session.login_user).getAvatar()==null">
                        <img src="http://honoka.qiniudn.com/20150524035814180/Kancolle_logo.jpg" height="60" width="60">
                    </s:if>
                    <s:else>
                        <img src="<s:property value="(#session.login_user).getAvatar()"/>" height="60" width="60">
                    </s:else>
                </div>
                <div class="input-textarea">
                    <textarea name="sayTxt" id="wikiEdit-textarea" rows="5" class="input" placeholder="说点什么吧"></textarea>
                    <div class="insert-image">
                        <a><span class="glyphicon glyphicon-picture"></span></a>
                    </div>
                    <div class="comment-button">
                        <div id="message"></div>
                        <button class="btn btn-primary">发布</button>
                    </div>
                </div>

                <div class="clear"></div>
            </div>
        </form>

    </div>
    <!--置顶-->
    <div class="scrollUp notshow">
        <div class="scrollUp-font">
            <span class="glyphicon glyphicon-menu-up"></span>
        </div>
    </div>
    <!--模态框-->
    <s:include value="modal_mask.jsp" />
    <s:include value="footer.jsp" />
</div>
<input type="hidden" id="thread-id" value="${threadid}">
<script src="/Public/js/jquery.min.js"></script>
<script src="/Public/js/bootstrap.min.js"></script>
<script src="/Public/js/jquery.feelywikicode.min.js"></script>
<script src="/Public/js/main.js"></script>
<script src="/Public/js/bbs.js"></script>
</body>
</html>
